package name.wilbur.course.db.bigone.control;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import name.wilbur.course.db.bigone.model.User;

public class BaseMgr {
	protected Map<String, Object> session;
	
	public BaseMgr() {
		this.session = new ConcurrentHashMap<String, Object>();
	}
	
	public BaseMgr(Map<String, Object> session) {
		this.session = session;
	}
	
	public void setMe(User me) {
		session.put("me", me);
	}
	
	public User getMe() {
		return (User) session.get("me");
	}
	
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}
	
	public Map<String, Object> getSession() {
		return session;
	}
	
	public void clearSession() {
		session.clear();
	}
}
